@import './base.css';
@import '../styles/variables.css';

/* 全局样式重置和增强 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* 选择文本样式 */
::selection {
  background-color: var(--primary-light);
  color: white;
}

/* 通用工具类 */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
}

.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-up {
  animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 按钮增强样式 */
.btn-gradient {
  background: var(--gradient-primary);
  border: none;
  color: white;
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-weight: 600;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 卡片样式增强 */
.modern-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.modern-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* 夜间模式下的卡片样式 */
html.dark .modern-card {
  background: #2a2a2a !important;
  border-color: #404040 !important;
  color: #ffffff !important;
}

html.dark .modern-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1) !important;
}

/* 夜间模式下的全局样式 */
html.dark body {
  background-color: #1d1e1f !important;
  color: #ffffff !important;
}

html.dark .modern-input {
  background: #2a2a2a !important;
  border-color: #404040 !important;
  color: #ffffff !important;
}

html.dark .modern-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

html.dark .modern-tag {
  background: #3a3a3a !important;
  color: #ffffff !important;
}

html.dark .modern-tag:hover {
  background: #4a4a4a !important;
}

/* 夜间模式下的滚动条样式 */
html.dark ::-webkit-scrollbar-track {
  background: #2a2a2a !important;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #4a4a4a !important;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a !important;
}

/* 输入框样式增强 */
.modern-input {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  transition: all var(--transition-fast);
  background: var(--bg-primary);
}

.modern-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

/* 标签样式增强 */
.modern-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  transition: all var(--transition-fast);
}

.modern-tag:hover {
  background: var(--gray-200);
  transform: scale(1.05);
}

/* 响应式网格 */
.responsive-grid {
  display: grid;
  gap: var(--spacing-lg);
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) and (min-width: 769px) {
  .responsive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }
}

#app {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-weight: normal;
}

a,
.green {
  text-decoration: none;
  color: hsla(160, 100%, 37%, 1);
  transition: 0.4s;
  padding: 3px;
}

@media (hover: hover) {
  a:hover {
    background-color: hsla(160, 100%, 37%, 0.2);
  }
}